-
Notifications
You must be signed in to change notification settings - Fork 183
Refactored Phenotype Enum; Added ATOW Attributes to Character Generation; Added 'Extra Attribute Randomization' Campaign Option #6564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Replaced static resource-based getters in `Phenotype` with dynamic methods using resource bundles (`getLabel`, `getTooltip`, `getShortName`). - Introduced attribute modifiers and bonus traits for `Phenotype`. - Added the `isTrueborn` method for Clan phenotype classification. - Deprecation of legacy methods like `getToolTipText`, `getName`, `parseFromString`, and `getGroupingName`. - Reimplemented parsing logic with the `fromString` method supporting legacy inputs, labels, and ordinal formats. - Implemented and applied random attribute generation in `RandomSkillPreferences` and `DefaultPersonnelGenerator`. - Added UI elements and tooltips for randomizing attributes. - Enhanced unit tests for attribute randomization and label validity.
…tency by formatting component names with `{@code}`.
- Added phenotype-based SPA generation by incorporating bonus traits from a character's phenotype. - Imported `LVL3_ADVANTAGES` and adjusted logic to acquire phenotype traits as abilities. - Refactored minor formatting issues for improved readability.
…ed condition block.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6564 +/- ##
============================================
- Coverage 11.44% 11.44% -0.01%
+ Complexity 6474 6469 -5
============================================
Files 1089 1090 +1
Lines 140180 140301 +121
Branches 21745 21776 +31
============================================
+ Hits 16041 16052 +11
- Misses 122505 122597 +92
- Partials 1634 1652 +18 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…and align with localized key usage. - Refactored and standardized string formatting across affected files for improved readability. - Removed hardcoded personnel role strings from `Personnel.properties` and introduced `PersonnelRole.properties` to centralize localization resources. - Replaced `parseFromString` method with `fromString` for improved method naming and expanded functionality, including handling deprecated names and case variations. - Added unit tests to validate new `getLabel` functionality, `fromString` method, and missing resource keys for roles. - Updated XML generation and parsing methods to utilize the new role localization handling with `getLabel`.
Updated to incorporate the ATOW and ATOW:Companion attributes. I'm going to mark this as draft, as there is one last thing I want to do. |
…te random roleplay attributes for personnel.es.
…Random Roleplay Attributes" to "Reset Roleplay Attributes."
Added a personnel right-click menu GM option to set ATOW Attributes for existing characters. |
Flipping this back to live from draft |
… SPAs - Introduced a new `AttributeScoreSorter` for comparing "x / y" formatted strings, sorting by primary and secondary values. - Updated attribute display and sorting in `PersonnelTableModelColumn` to represent both current scores and caps ("x / y"). - Added new "Exceptional Attribute" SPAs to increase attribute caps. - Modified phenotype definitions in `Phenotype` to include attribute caps specific to each phenotype. - Adjusted attribute handling logic to respect both phenotype caps and SPA adjustments. - Enhanced unit tests to verify attribute caps and ensure adherence to defined ranges.
# Conflicts: # MekHQ/src/mekhq/campaign/personnel/skills/Attributes.java
Added Attribute Maximums Based on Phenotype and Exceptional Attribute SPAs
|
# Conflicts: # MekHQ/data/universe/defaultspa.xml # MekHQ/resources/mekhq/resources/CampaignOptionsDialog.properties # MekHQ/resources/mekhq/resources/GUI.properties # MekHQ/src/mekhq/campaign/RandomSkillPreferences.java # MekHQ/src/mekhq/campaign/personnel/Person.java # MekHQ/src/mekhq/campaign/personnel/generator/DefaultPersonnelGenerator.java # MekHQ/src/mekhq/campaign/personnel/generator/DefaultSkillGenerator.java # MekHQ/src/mekhq/gui/adapter/PersonnelTableMouseAdapter.java # MekHQ/src/mekhq/gui/campaignOptions/contents/AdvancementTab.java
Requirements
Requires #6607
Dev Notes
Phenotypes
Certain phenotypes increase or decrease attributes. Some phenotypes also provide specific Traits (SPAs, in our nomenclature). Both of these cases are now fully implemented. I also went ahead and cleaned up the enum a bit, switching it over to i18n and updating the Unit Tests.
Professions
ATOW includes a few archetypes which offer suggested starting points for each attribute score. I've set up the code so that characters will generate (on average) with those attribute scores. However, a few of the examples provided in the manuals are straight up awful.
The Tanker archetype is the worst example. If I were to implement that Archetype most vehicle crew would spawn with a -1 penalty to both gunnery and piloting. Needless to say, that shan't be happening.So while the code is set up to handle role-based attribute starting points, currently they're all set up to infer no modifier. I'm hoping to encourage a knowledgeable community member into providing some suggested starting attributes for our different professions. Once that's been sourced I can go in an update this (possibly in a separate PR).Edit: This turned out to be an error in the manuals. I've since gone through and updated the Professions to have appropriate starting Attribute scores.
Campaign Options & Character Generation
When a character is generated, they are done so with 5 in every Attribute. A d6 is then rolled for each Attribute. On a roll of 1 the Attribute is decreased by 1; on a roll of 6 the Attribute is increased by 1.
In Campaign Options players can enable 'Extra Random Attributes'. This works identical to the above, however the d6 will 'explode'. What this means is if you roll a 1, you decrease the Attribute by 1 and then roll again. And keep going until you stop rolling 1s (or hit the minimum Attribute score of 1 - this isn't Traveller, nobody is dying in character creation). Conversely, if you roll a 6 you keep increasing the Attribute score by 1 until you stop rolling 6s (or hit the maximum Attribute score of 10).